<?php
	session_start();
	include("../user_type/system.php");
	include("../access/opendb.php");
	$page = $_SESSION['curPage'];

	if ($_SESSION['restricted'])
		$page = "home.php";

	if ($_SESSION['status'] == "PendingBan")
		System::banUser($_SESSION['ID']);
		
	unset($_SESSION['user']); 
	unset($_SESSION['ID']);
	unset($_SESSION['status']);

	include("../access/closedb.php");
	Header("Location: ../$page");
?>